<?php


namespace App\Admin\Extensions;

use Dcat\Admin\Form\Field;

class Tags extends Field
{
    protected $view = 'admin.tags';
    protected static $css = [
        'https://cdn.bootcdn.net/ajax/libs/bootstrap-tagsinput/0.8.0/bootstrap-tagsinput.css',
    ];
    protected static $js = [
        'https://cdn.bootcdn.net/ajax/libs/bootstrap-tagsinput/0.8.0/bootstrap-tagsinput.min.js',
    ];
    public function render()
    {
        $this->script = "$(\"{$this->getElementClassSelector()} \").tagsinput();";
        return parent::render();
    }
}